﻿using System;
using System.Collections.Generic;
using System.Text;
using Watchdog.Dal;
using Watchdog.Bll;
using Watchdog.Bll.Base;

namespace Watchdog.Bll.Factory {

    public partial class TestTargetStatusFactory {
        public static void Delete ( TestTargetStatusBase testtargetstatus ) {
            DataClient.Current.TestTargetStatusDelete ( testtargetstatus.IntData );
        }

        //public static List<TestTargetStatus> GetByTest ( int test ) {
        //    List<TestTargetStatus> outlist = new List<TestTargetStatus> ();
        //    Watchdog.Facade.TestTargetStatus[] list = Dal.DataClient.Current.TestTargetStatusGetByTest ( test );
        //    foreach (Watchdog.Facade.TestTargetStatus item in list)
        //        outlist.Add ( (TestTargetStatus)new TestTargetStatusBase ( item ) );
        //    return outlist;
        //    // return DataClient.Current.TestTargetStatusGetByTest ( test );
        //}
        public static List<TestTargetStatus> GetByTestTarget ( int testtarget ) {
		    List<TestTargetStatus> outlist = new List<TestTargetStatus> ();
            Watchdog.Facade.TestTargetStatus[] list = Dal.DataClient.Current.TestTargetStatusGetByTestTarget ( testtarget );
            foreach (Watchdog.Facade.TestTargetStatus item in list)
                outlist.Add ( (TestTargetStatus)new TestTargetStatusBase ( item ) );
            return outlist;
            // return DataClient.Current.TestTargetStatusGetByTestTarget ( testtarget );
        }
        public static void Insert ( TestTargetStatusBase testtargetstatus ) {
            testtargetstatus.IntData = DataClient.Current.TestTargetStatusInsert ( testtargetstatus.IntData );
        }
		
        public static void Update ( TestTargetStatusBase testtargetstatus ) {
            DataClient.Current.TestTargetStatusUpdate ( testtargetstatus.IntData );
        }
		
	}
}
